<script>
	import {
		mapMutations
	} from 'vuex'
	export default {
		methods: {
			...mapMutations('login', {
				setLoginInfo: 'SET_LOGININFO'
			}),
		},
		onLaunch: function() {},
		onShow: function() {
			const token = uni.getStorageSync('token') || ''
			const userInfo = uni.getStorageSync('userInfo') ? JSON.parse(uni.getStorageSync('userInfo')) : {}
			const isAuth = uni.getStorageSync('isAuth') || false
			const pyload = {
				token,
				userInfo,
				isAuth
			}
			this.setLoginInfo(pyload)
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "@/static/iconfont.css";
	/*每个页面公共css */
	@import '@/uni_modules/uni-scss/index.scss';
	/* #ifndef APP-NVUE */
	@import '@/static/customicons.css';

	// 设置整个项目的背景色
	page {
		background-color: #f5f5f5;
	}

	/* #endif */
	.example-info {
		font-size: 14px;
		color: #333;
		padding: 10px;
	}
</style>